package cn.lyvust.init;

/**
 * Description:
 * date: 2021-4-6 22:20
 *
 * @author Guo_guo
 * @since JDK 1.8
 */
public class Student {
    public String name;
    public int age;
    public int score;

    public Student() {
        System.out.println("这是Student的默认构造函数，在实例化一个对象的时候自动调用");
    }

    public Student(String name,int score) {
        this.name = name;
        this.score = score;
    }

    public void work() {
        System.out.println("这是Student的成员函数，需要显示调用");
    }

    public void showInfo(){
        System.out.println(name+"的成绩是："+score);
    }
}
